Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add trailing_newline option to log #49

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

capripot
Copy link

@capripot capripot commented Oct 7, 2022

Describe the change

Adds trailing_newline option to TTY::Spinner#log.

Why are we doing this?

Following discussion on issue #43

Benefits

Allow seamless use of spinner.log("cool feature") but also more complex feature, like redirecting output of other command spinner.log("output\rcountaining carriage returns\r", trailing_newline: false).

Drawbacks

N/A

Requirements

  • Tests written & passing locally?
  • Code style checked? (rubocop on current master returns 62 files inspected, 102 offenses detected, 64 offenses autocorrectable)
  • Rebased with master branch?
  • Documentation updated?
  • Changelog updated?

lib/tty/spinner.rb Outdated Show resolved Hide resolved
lib/tty/spinner.rb Outdated Show resolved Hide resolved
spec/unit/log_spec.rb Outdated Show resolved Hide resolved
@capripot
Copy link
Author

We should think of multi-spinners case as well I think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants